package cn.sirun.com.fca.account.model.base;

import com.tencent.cloud.iov.util.ObjectUtils;

/**
 * 被授权信息
 *
 * 当前是否为被授权车辆，是的话展示被授权的信息；为车主时返回 null
 *
 * @author showxiao
 * @date 2018/10/19
 */
public class LastAuthorizedInfo {

    private long startTime;

    private long endTime;

    private long ownerPhone;

    public long getStartTime() {
        return startTime;
    }

    public void setStartTime(long startTime) {
        this.startTime = startTime;
    }

    public long getEndTime() {
        return endTime;
    }

    public void setEndTime(long endTime) {
        this.endTime = endTime;
    }

    public long getOwnerPhone() {
        return ownerPhone;
    }

    public void setOwnerPhone(long ownerPhone) {
        this.ownerPhone = ownerPhone;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        LastAuthorizedInfo that = (LastAuthorizedInfo) o;
        return startTime == that.startTime &&
                endTime == that.endTime &&
                ownerPhone == that.ownerPhone;
    }

    @Override
    public int hashCode() {
        return ObjectUtils.hash(startTime, endTime, ownerPhone);
    }

    @Override
    public String toString() {
        return "LastAuthorizedInfo{" +
                "startTime=" + startTime +
                ", endTime=" + endTime +
                ", ownerPhone=" + ownerPhone +
                '}';
    }
}
